<?php 
session_start();
include "../_init_.php";

$action= isset($_REQUEST["action"])?$_REQUEST["action"]:'';
switch($action)
{
	case 'save':
		Util::setGlobalValue('GLOBAL_PARAMETER_1',$_REQUEST['GLOBAL_PARAMETER_1']);
		Util::setGlobalValue('GLOBAL_PARAMETER_2',$_REQUEST['GLOBAL_PARAMETER_2']);
		Util::setGlobalValue('MAX_FRONT_RENT_NUMBER',intval($_REQUEST['MAX_FRONT_RENT_NUMBER']));
		Util::setGlobalValue('WEBSITE_NAME_TEXT',$_REQUEST['WEBSITE_NAME_TEXT']);
		Util::setGlobalValue('WEBSITE_KEY_WORDS_TEXT',$_REQUEST['WEBSITE_KEY_WORDS_TEXT']);
	break;
}
?>
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>網站管理系統</title>


<LINK REL="stylesheet" HREF="css/style.css" TYPE="text/css">
<LINK REL="stylesheet" HREF="css/main.css" TYPE="text/css">
<script src="js/FancyZoom.js" language="JavaScript" type="text/javascript"></script>
<script src="js/FancyZoomHTML.js" language="JavaScript" type="text/javascript"></script>
<body onLoad="setupZoom();">

<table width="100%" border="0" class="table2">
  <tr>
    <td>系統管理 - 參數配置</td>
  </tr>
</table>
<?php if($error_message):?>
<div class="error_message"><?php echo $error_message;?></div>
<?php endif;?>
<?php if($sucess_message):?>
<div class="success_message"><?php echo $sucess_message;?></div>
<?php endif;?>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" valign="top">
    
      <table width="100%" border="0" cellpadding="2" cellspacing="1" class="table_southidc">
        <tr> 
          <td  height="20" class="back_southidc"> <div align="center"><strong>參數配置</strong></div></td>
        </tr>
        <tr  class="tr_southidc">          
            <td bgcolor="#B0DAFF">
              <form method="post">
              <input type="hidden" name="action" value="save"/>
              <table width="100%" border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#0000FF">
              <tr>
              		<td>產品生活部URL:</td>
              		<td><input type="text" name="GLOBAL_PARAMETER_1" value="<?php echo Util::getGlobalValue('GLOBAL_PARAMETER_1');?>"></td>
              </tr>
             <tr>
              		<td>管家部:</td>
              		<td><input type="text" name="GLOBAL_PARAMETER_2" value="<?php echo Util::getGlobalValue('GLOBAL_PARAMETER_2');?>"></td>
              </tr>
              <tr>
              		<td>首頁最新房屋數目:</td>
              		<td><input type="text" name="MAX_FRONT_RENT_NUMBER" value="<?php echo Util::getGlobalValue('MAX_FRONT_RENT_NUMBER');?>"></td>
              </tr>
               <tr>
              		<td>網站名稱:</td>
              		<td><input type="text" name="WEBSITE_NAME_TEXT" value="<?php echo Util::getGlobalValue('WEBSITE_NAME_TEXT');?>"></td>
              </tr>
               <tr>
              		<td>網站關鍵字:</td>
              		<td><textarea cols="50" row="4" name="WEBSITE_KEY_WORDS_TEXT"><?php echo Util::getGlobalValue('WEBSITE_KEY_WORDS_TEXT');?></textarea></td>
              </tr>
              <tr>
              		<td colspan="2" align="center"><input type="submit" value="確認送出"/></td>
              </tr>
         	 </table>
         	 </form>
           </td>         
        </tr>
      </table>
    </td>
  </tr>
</table>
<?php  include("foot.php");?>